//package com.msxt.interceptor;
//
//import com.msxt.interceptor.JwtTokenAdminInterceptor;
//import com.msxt.interceptor.JwtTokenShangjiaInterceptor;
//import com.msxt.interceptor.JwtTokenYonghuInterceptor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.HandlerInterceptor;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//@Component
//@Slf4j
//public class GlobalAuthInterceptor implements HandlerInterceptor {
//
//    @Autowired
//    private JwtTokenAdminInterceptor adminInterceptor;
//
//    @Autowired
//    private JwtTokenShangjiaInterceptor shangjiaInterceptor;
//
//    @Autowired
//    private JwtTokenYonghuInterceptor yonghuInterceptor;
//
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        String path = request.getRequestURI();
//
//        // 根据路径选择不同的拦截器
//        if (path.startsWith("/admin/")) {
//            return adminInterceptor.preHandle(request, response, handler);
//        } else if (path.startsWith("/shangjia/") || path.startsWith("/minsukefang/")) {
//            return shangjiaInterceptor.preHandle(request, response, handler);
//        } else if (path.startsWith("/yonghu/")) {
//            return yonghuInterceptor.preHandle(request, response, handler);
//        }
//
//        // 对于其他路径，可以选择放行或进行基本认证
//        return true;
//    }
//
//}